package com.egao.common.core.damon.utils;

import com.egao.common.core.damon.constant.UserConstant;

/**
 * @author Damon
 * @create 2021-04-27 10:16
 */
public class SszgUtils {

    /**
     * 返回税点
     *
     * @param invoice
     * @return
     */
    public static float getInvoiceNum(float price, String invoice) {
        if (invoice == null || invoice.isEmpty() || invoice.replaceAll(" ", "").isEmpty()) {
            //普通税点为 1.09
            return price / UserConstant.INVOICENUM;
        }
        if(",赵正兵,刘德全,".contains(","+invoice+",")) {
            //司机赵正兵和刘德全 税点跟别人不一样 为0.88
            return price * UserConstant.SZ_INVOICENUM;
        } else {
            //普通税点为 1.09
            return price / UserConstant.INVOICENUM;
        }
    }

}
